projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c85e424
)
sortlistmodel: Fix a crash
author
Matthias Clasen
<mclasen@redhat.com>
Fri, 24 Jul 2020 14:40:55 +0000
(10:40 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Fri, 24 Jul 2020 18:15:14 +0000
(14:15 -0400)
gtk/gtksortlistmodel.c
patch
|
blob
|
history
diff --git
a/gtk/gtksortlistmodel.c
b/gtk/gtksortlistmodel.c
index f79bb77a1e476437eb6e3ea8c02fd0622fdb3cba..64bd038bccddebcdbedcf46fc3c7da958d1f178a 100644
(file)
--- a/
gtk/gtksortlistmodel.c
+++ b/
gtk/gtksortlistmodel.c
@@
-148,6
+148,9
@@
gtk_sort_list_model_get_item (GListModel *list,
if (self->model == NULL)
return NULL;
+ if (position >= self->n_items)
+ return NULL;
+
if (self->positions)
position = pos_from_key (self, self->positions[position]);